<div>
    <div class="row">
        <div class="col-md-1 padding-r-0">
            <div class=" border-radius ">
                <div class="margin-xs-r  treeview ">
                    <ul class="list-group text-center border-radius">
                        <li class="list-group-item node-orgTree " v-for="(item, index) in eventPoolManageInfo.objTypeList" :key="index" @click="switchObjType(item)" :class="{'vc-node-selected':eventPoolManageInfo.conditions.objType == item.statusCd}">
                            {{item.name}}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-11">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-title">
                            <h5>
                                <vc:i18n name="查询条件"></vc:i18n>
                            </h5>
                            <div class="ibox-tools" style="top:10px;">

                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <select class="custom-select" v-model="eventPoolManageInfo.conditions.ruleId">
                                            <option selected disabled value="">{{vc.i18n('请选择规则','eventPoolManage')}}</option>
                                            <option v-for="(item, index) in eventRuleList" :key="index" :value="item.ruleId">
                                                {{item.ruleName}}
                                            </option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <select class="custom-select" v-model="eventPoolManageInfo.conditions.eventType">
                                            <option selected disabled value="">{{vc.i18n('请选择事件类型','eventPoolManage')}}</option>
                                            <option v-for="(item, index) in eventTypeList" :key="index" :value="item.statusCd">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <select class="custom-select" v-model="eventPoolManageInfo.conditions.state">
                                            <option selected disabled value="">{{vc.i18n('请选择事件状态','eventPoolManage')}}</option>
                                            <option value="W">{{vc.i18n('待处理','eventPoolManage')}}</option>
                                            <option value="NC">{{vc.i18n('正常处理完成','eventPoolManage')}}</option>
                                            <option value="TC">{{vc.i18n('超时处理完成','eventPoolManage')}}</option>
                                            <option value="D">{{vc.i18n('处理中','eventPoolManage')}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请输入对象名称','eventPoolManage')" v-model="eventPoolManageInfo.conditions.objectName" class=" form-control">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <select class="custom-select" v-model="eventPoolManageInfo.conditions.fromType">
                                            <option selected disabled value="">{{vc.i18n('请选择事件来源','eventPoolManage')}}</option>
                                            <option value="PERSON">{{vc.i18n('人员创建','eventPoolManage')}}</option>
                                            <option value="SYSTEM">{{vc.i18n('平台创建','eventPoolManage')}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <button type="button" class="btn btn-primary btn-sm"
                                            v-on:click="_queryEventPoolMethod()">
                                        <vc:i18n name="查询" namespace="eventPoolManage"></vc:i18n>
                                    </button>
                                    <button type="button" class="btn btn-primary btn-sm"
                                            v-on:click="_resetEventPoolMethod()">
                                        <vc:i18n name="重置" namespace="eventPoolManage"></vc:i18n>
                                    </button>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请输入开始时间','eventPoolManage')"
                                            v-model="eventPoolManageInfo.conditions.queryStartTime"
                                            class=" form-control queryStartTime">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请输入结束时间','eventPoolManage')"
                                            v-model="eventPoolManageInfo.conditions.queryEndTime"
                                            class=" form-control queryEndTime">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox">
                        <div class="ibox-title">
                            <h5>
                                <vc:i18n name="事件池" namespace="eventPoolManage"></vc:i18n>
                            </h5>
                            <div class="ibox-tools" style="top:10px;">
                                <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddEventPoolModal()">
                                    <vc:i18n name="添加" namespace="eventPoolManage"></vc:i18n>
                                </button>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                                <thead>
                                    <tr>
                                        <th class="text-center">
                                            <vc:i18n name='编号' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='规则名称' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='事件类型' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='事件描述' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='对象类型' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='对象名称' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='来自' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='人员/平台名称' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='状态' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='备注' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='添加时间' namespace='eventPoolManage'></vc:i18n>
                                        </th>
                                        <th class="text-center">
                                            <vc:i18n name='操作'></vc:i18n>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr v-for="eventPool in eventPoolManageInfo.eventPools">
                                        <td class="text-center">{{eventPool.eventId}}</td>
                                        <td class="text-center">{{eventPool.ruleName}}</td>
                                        <td class="text-center">{{eventPool.eventTypeName}}</td>
                                        <td class="text-center">
                                            <button class="btn-white btn btn-xs" v-on:click="_openModel(eventPool.eventMsg, '事件描述')">
                                                <vc:i18n name='查看'></vc:i18n>
                                            </button>
                                        </td>
                                        <td class="text-center">{{eventPool.objTypeName}}</td>
                                        <td class="text-center">{{eventPool.objectName}}</td>
                                        <td class="text-center">
                                            <label v-if="eventPool.fromType === 'PERSON'">{{vc.i18n('人员创建','eventPoolManage')}}</label>
                                            <label v-if="eventPool.fromType === 'SYSTEM'">{{vc.i18n('平台创建','eventPoolManage')}}</label>
                                        </td>
                                        <td class="text-center">{{eventPool.fromName}}</td>
                                        <td class="text-center">
                                            <label v-if="eventPool.state === 'W'">{{vc.i18n('待处理','eventPoolManage')}}</label>
                                            <label v-if="eventPool.state === 'NC'">{{vc.i18n('正常处理完成','eventPoolManage')}}</label>
                                            <label v-if="eventPool.state === 'TC'">{{vc.i18n('超时处理完成','eventPoolManage')}}</label>
                                            <label v-if="eventPool.state === 'D'">{{vc.i18n('处理中','eventPoolManage')}}</label>
                                        </td>
                                        <td class="text-center">
                                            <button class="btn-white btn btn-xs" v-on:click="_openModel(eventPool.remark, '备注')">
                                                <vc:i18n name='查看'></vc:i18n>
                                            </button>
                                        </td>
                                        <td class="text-center">{{eventPool.createTime}}</td>
                                        <td class="text-center">
                                            <div class="btn-group">
                                                <button class="btn-white btn btn-xs" v-on:click="_toEventDetail(eventPool)">
                                                    <vc:i18n name='详情'></vc:i18n>
                                                </button>
                                            </div>
                                            <div class="btn-group" v-if="eventPool.state === 'W'">
                                                <button class="btn-white btn btn-xs" v-on:click="_openAddEventPoolStaffModal(eventPool)">
                                                    <vc:i18n name='分配'></vc:i18n>
                                                </button>
                                            </div>
                                            <div class="btn-group" v-if="eventPool.state !== 'W'">
                                                <button class="btn-white btn btn-xs" v-on:click="_openEventPoolStaffModal(eventPool)">
                                                    <vc:i18n name='查看分配'></vc:i18n>
                                                </button>
                                            </div>
                                            <div class="btn-group" v-if="eventPool.state === 'D' && eventPool.eventPoolStaffList[0].state === 'D'">
                                                <button class="btn-white btn btn-xs" v-on:click="_completeEvent(eventPool)">
                                                    <vc:i18n name='完成(模拟)'></vc:i18n>
                                                </button>
                                            </div>
                                            <div class="btn-group">
                                                <button class="btn-white btn btn-xs" v-on:click="_openDeleteEventPoolModel(eventPool)">
                                                    <vc:i18n name='删除'></vc:i18n>
                                                </button>
                                            </div>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                    <tr>
                                        <td colspan="11">
                                            <ul class="pagination float-right"></ul>
                                        </td>
                                    </tr>
                                </tfoot>
                            </table>
                            <!-- 分页 -->
                            <vc:create path="frame/pagination"></vc:create>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <vc:create path="event/deleteEventPool"></vc:create>
    <vc:create path="event/addEventPoolStaff" callBackListener="" callBackFunction=""></vc:create>
    <vc:create path="event/viewData"></vc:create>
    <vc:create path="event/viewEventPoolStaffInfo"></vc:create>

</div>
